<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改气象数据')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-meteorData-edit" th:object="${meteorData}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">船体编号：</label>
                <div class="col-sm-8">
                    <input name="boatCode" th:field="*{boatCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备编号：</label>
                <div class="col-sm-8">
                    <input name="deviceCode" th:field="*{deviceCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风向：</label>
                <div class="col-sm-8">
                    <input name="windDirection" th:field="*{windDirection}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风速：</label>
                <div class="col-sm-8">
                    <input name="windSpeed" th:field="*{windSpeed}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">气温：</label>
                <div class="col-sm-8">
                    <input name="temp" th:field="*{temp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">湿度：</label>
                <div class="col-sm-8">
                    <input name="humidty" th:field="*{humidty}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">气压：</label>
                <div class="col-sm-8">
                    <input name="pressure" th:field="*{pressure}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">水温：</label>
                <div class="col-sm-8">
                    <input name="ctdTemp" th:field="*{ctdTemp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电导率：</label>
                <div class="col-sm-8">
                    <input name="ctdDdl" th:field="*{ctdDdl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">深度：</label>
                <div class="col-sm-8">
                    <input name="ctdSd" th:field="*{ctdSd}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采集时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="time" th:value="${#dates.format(meteorData.time, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "boat/meteorData";
        $("#form-meteorData-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-meteorData-edit').serialize());
            }
        }

        $("input[name='time']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>